package com.thesis.teacher.controller;

import com.thesis.manage.common.controller.AbstractController;
import com.thesis.manage.service.CollegeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author php
 * @date 2018/3/12
 */
@RequestMapping("/college")
@RestController
public class CollegeController extends AbstractController {
    @Resource
    private CollegeService collegeService;

    @GetMapping("/list")
    public Map<String, Object> list() {
        return buildMessage(() -> collegeService.findAll());
    }
}
